#!/usr/bin/env bash
# 先使用renew.sh生成新证书
# 导出证书文件,接收生成路径参数，不传默认/tmp/cert
# eg: getCert.sh /tmp/cert
certPath=${1:-/www/server/panel/vhost/ssl/lj4.top}
if [ -d $certPath ]; then
   echo
else
   mkdir $certPath
fi

/root/.acme.sh/acme.sh -i -d *.lj4.top --fullchain-file $certPath/fullchain.pem --key-file $certPath/privkey.pem
echo "导入证书目录：$certPath"
